<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>质检标准</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/layui.css"  media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/toastr.min.css"  media="all">
	<style type="text/css">
		/* .site-doc-icon li{
			width: 222px;
		} */
		.box{
			height:auto;
			margin: 20px 20px;
		}
		.site-doc-icon .layui-anim{
			display:inline-block;
			width: 120px; 
			height: 50px; 
			line-height: 50px; 
			margin: 0 20px; 
			text-align: center; 
			background-color: #009688; 
			cursor: pointer; 
			color: #fff; 
		}
		#addForm2 .layui-form-label,#editForm2 .layui-form-label {
			width: 295px !important;
		}
		#addForm3 .layui-form-label,#editForm3 .layui-form-label {
			width: 150px !important;
		}
		#addForm4 .layui-form-label,#editForm4 .layui-form-label {
			width: 150px !important;
		}
		#addForm5 .layui-form-label,#editForm5 .layui-form-label {
			width: 150px !important;
		}
	</style>
</head>
<body>
	<div class="box site-doc-icon site-doc-anim">
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="accessories()">配件检验标准</div>
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="leakHunting()">检漏标准</div>
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="evaluateCriterion()">组件评价标准</div>
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="gas()">气密性检测标准</div>
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="silk()">膜丝标准</div>
	    <div class="layui-anim" data-anim="layui-anim-scale" onclick="jzSpotCheck()">浇铸抽检标准</div>
	</div>
	<div>
		<table class="layui-table layui-hide" id="tab1">
			<thead>
				<tr>
					<th colspan="4"><h2 style="text-align: center;">配件检验标准</h2></th>
					<th class="layui-hide"><input id="dataSize1"/></th>
					<th class="layui-hide"><input id="acId"/></th>
				</tr>
				<tr>
					<td colspan="4">
						<input type="button" class="layui-btn" id="btn1" value="">
					</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>尺寸1（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeOneUp"/></td>
					<td>尺寸1（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeOneDown"/></td>
				</tr>
				<tr>
					<td>尺寸2（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeTwoUp"/></td>
					<td>尺寸2（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeTwoDown"/></td>
				</tr>
				<tr>
					<td>尺寸3（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeThreeUp"/></td>
					<td>尺寸3（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="sizeThreeDown"/></td>
				</tr>
			</tbody>
		</table>
		<table class="layui-table layui-hide" id="tab2">
			<thead>
				<tr>
					<th colspan="4"><h2 style="text-align: center;">检漏标准</h2></th>
					<th class="layui-hide"><input id="dataSize2"/></th>
					<th class="layui-hide"><input id="lcId"/></th>
				</tr>
				<tr>
					<td colspan="4">
						<input type="button" class="layui-btn" id="btn2" value="">
					</td>
				</tr>
				<tr>
					<th colspan="2">
						<h3 style="text-align: center;">合格</h3>
					</th>
					<th colspan="2">
						<h3 style="text-align: center;">异常</h3>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>MAX(软硬A总数，软硬B总数)【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="ryCountOne"/></td>
					<td>MAX(软硬A总数，软硬B总数)【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="ryCountTwo"/></td>
				</tr>
				<tr>
					<td>MAX(瘪丝A，瘪丝B)【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="bsCountOne"/></td>
					<td>MAX(瘪丝A，瘪丝B)【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="bsCountTwo"/></td>
				</tr>
				<tr>
					<td>MAX(弯丝A，弯丝B)【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="wsCountOne"/></td>
					<td>MAX(弯丝A，弯丝B)【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="wsCountTwo"/></td>
				</tr>
				<tr>
					<td>MAX(N次检漏A总数，N次检漏B总数)【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="nleakHuntingCountOne"/></td>
					<td>MAX(N次检漏A总数，N次检漏B总数)【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="nleakHuntingCountTwo"/></td>
				</tr>
				<tr>
					<td>端面补胶【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="dmbjOne"/></td>
					<td>端面补胶【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="dmbjTwo"/></td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="4">
						<input style="color:red" class="layui-input" value="* 注：每个组件的各项检漏数全部小于等于【合格】则组件合格，若有一项检漏数大于等于【异常】则组件异常，否则降级"/>
					</td>
				</tr>
			</tfoot>
		</table>
		<table class="layui-table layui-hide" id="tab3">
			<thead>
				<tr>
					<th colspan="4"><h2 style="text-align: center;">组件评价标准</h2></th>
					<th class="layui-hide"><input id="dataSize3"/></th>
					<th class="layui-hide"><input id="evId"/></th>
				</tr>
				<tr>
					<td colspan="4">
						<input type="button" class="layui-btn" id="btn3" value="">
					</td>
				</tr>
				<tr>
					<th colspan="2">
						<h3 style="text-align: center;">合格</h3>
					</th>
					<th colspan="2">
						<h3 style="text-align: center;">异常</h3>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>产水通量【合格】</td>
					<td><input class="layui-input" readonly="readonly" id="csFluxOne"/></td>
					<td>产水通量【异常】</td>
					<td><input class="layui-input" readonly="readonly" id="csFluxTwo"/></td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="4">
						<input style="color:red" class="layui-input" value="* 注：组件的产水通量大于等于【合格】则组件合格，小于等于【异常】则组件异常，否则降级"/>
					</td>
				</tr>
			</tfoot>
		</table>
		<table class="layui-table layui-hide" id="tab4">
			<thead>
				<tr>
					<th colspan="4"><h2 style="text-align: center;">气密检验标准</h2></th>
					<th class="layui-hide"><input id="dataSize4"/></th>
					<th class="layui-hide"><input id="gId"/></th>
				</tr>
				<tr>
					<td colspan="4">
						<input type="button" class="layui-btn" id="btn4" value="">
					</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>1次间隔时间（s）</td>
					<td><input class="layui-input" readonly="readonly" id="oneTime"/></td>
					<td>3次间隔时间（s）</td>
					<td><input class="layui-input" readonly="readonly" id="threeTime"/></td>
				</tr>
			</tbody>
		</table>
		<table class="layui-table layui-hide" id="tab5">
			<thead>
				<tr>
					<th colspan="4"><h2 style="text-align: center;">膜丝标准</h2></th>
					<th class="layui-hide"><input id="dataSize5"/></th>
					<th class="layui-hide"><input id="sId"/></th>
				</tr>
				<tr>
					<td colspan="4">
						<input type="button" class="layui-btn" id="btn5" value="">
					</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>通量（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="fluxUp"/></td>
					<td>通量（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="fluxDown"/></td>
				</tr>
				<tr>
					<td>内径（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="innerUp"/></td>
					<td>内径（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="innerDown"/></td>
				</tr>
				<tr>
					<td>壁厚（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="wallUp"/></td>
					<td>壁厚（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="wallDown"/></td>
				</tr>
				<tr>
					<td>泡点压力（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="pressureUp"/></td>
					<td>泡点压力（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="pressureDown"/></td>
				</tr>
				<tr>
					<td>强度（上限值）</td>
					<td><input class="layui-input" readonly="readonly" id="strengthUp"/></td>
					<td>强度（下限值）</td>
					<td><input class="layui-input" readonly="readonly" id="strengthDown"/></td>
				</tr>
			</tbody>
		</table>
		<div id="tab6" class="layui-hide">
			<script type="text/html" id="toolbarDemo">
				<div class="layui-btn-container">
					<button class="layui-btn layui-btn-blue" lay-event="add"><i class="layui-icon layui-icon-add-1">  新增</i></button>
				</div>
			</script>
			<h2 style="text-align: center;color:#666" class="layui-hide" id="detailsTitle">浇铸抽检标准</h2>
			<table class="layui-hide" id="jzSpotCheckCriterion" lay-filter="jzSpotCheckCriterion"></table>
			<script type="text/html" id="barDemo">
				<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
			</script>
		</div>
	</div>
<script src="${pageContext.request.contextPath }/assets/layui.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath }/assets/layui.all.js"></script>
<script src="${pageContext.request.contextPath }/assets/js/jquery.min.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath }/assets/js/toastr.min.js" charset="utf-8"></script>
<script>
//日期格式转换
function createTime(v){
	var date = new Date(v);
    var y = date.getFullYear();
    var M = date.getMonth()+1;
    M = M<10?'0'+M:M;
    var d = date.getDate();
    d = d<10?("0"+d):d;
    var h = date.getHours();
    h = h<10?("0"+h):h;
    var m = date.getMinutes();
    m = m<10?("0"+m):m;
    var str = y+"-"+M+"-"+d;
    return str;
}
//日期格式转换
function date2String(timestamp){
	var d = new Date(timestamp);
	var date = (d.getFullYear()) + "-" + 
       (d.getMonth() + 1<10?"0"+(d.getMonth() + 1):d.getMonth() + 1) + "-" +
       (d.getDate()<10?"0"+d.getDate():d.getDate()) + " " + 
       (d.getHours()<10?"0"+d.getHours():d.getHours()) + ":" + 
       (d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes()) + ":" + 
       (d.getSeconds()<10?"0"+d.getSeconds():d.getSeconds());
       
       return date;
}
$(function(){
	accessories();
})
//配件检验标准
function accessories(){
	$("#tab1").removeClass("layui-hide");
	$("#tab2").addClass("layui-hide");
	$("#tab3").addClass("layui-hide");
	$("#tab4").addClass("layui-hide");
	$("#tab5").addClass("layui-hide");
	$("#tab6").addClass("layui-hide");
	$.ajax({
		url:'${pageContext.request.contextPath }/criterion/selectAccessoriesCriterion.do'
		,type:'post'
		,dataType:'json'
		,success:function(data){
			if(data==0){
				$("#dataSize1").val(0);
				$("#btn1").val("新增");
			}else{
				$("#dataSize1").val(1);
				$("#acId").val(data.acId);
				$("#sizeOneUp").val(data.sizeOneUp);
				$("#sizeOneDown").val(data.sizeOneDown);
				$("#sizeTwoUp").val(data.sizeTwoUp);
				$("#sizeTwoDown").val(data.sizeTwoDown);
				$("#sizeThreeUp").val(data.sizeThreeUp);
				$("#sizeThreeDown").val(data.sizeThreeDown);
				$("#btn1").val("编辑");
			}
		}
	})
}
//检漏标准
function leakHunting(){
	$("#tab1").addClass("layui-hide");
	$("#tab2").removeClass("layui-hide");
	$("#tab3").addClass("layui-hide");
	$("#tab4").addClass("layui-hide");
	$("#tab5").addClass("layui-hide");
	$("#tab6").addClass("layui-hide");
	$.ajax({
		url:'${pageContext.request.contextPath }/criterion/selectLeakHuntingCriterion.do'
		,type:'post'
		,dataType:'json'
		,success:function(data){
			if(data==0){
				$("#dataSize2").val(0);
				$("#btn2").val("新增");
			}else{
				$("#dataSize2").val(1);
				$("#lcId").val(data.lcId);
				$("#ryCountOne").val(data.ryCountOne);
				$("#bsCountOne").val(data.bsCountOne);
				$("#wsCountOne").val(data.wsCountOne);
				$("#nleakHuntingCountOne").val(data.nleakHuntingCountOne);
				$("#dmbjOne").val(data.dmbjOne);
				$("#ryCountTwo").val(data.ryCountTwo);
				$("#bsCountTwo").val(data.bsCountTwo);
				$("#wsCountTwo").val(data.wsCountTwo);
				$("#nleakHuntingCountTwo").val(data.nleakHuntingCountTwo);
				$("#dmbjTwo").val(data.dmbjTwo);
				$("#btn2").val("编辑");
			}
		}
	})
}
//评价标准
function evaluateCriterion(){
	$("#tab1").addClass("layui-hide");
	$("#tab2").addClass("layui-hide");
	$("#tab3").removeClass("layui-hide");
	$("#tab4").addClass("layui-hide");
	$("#tab5").addClass("layui-hide");
	$("#tab6").addClass("layui-hide");
	$.ajax({
		url:'${pageContext.request.contextPath }/criterion/selectEvaluateCriterion.do'
		,type:'post'
		,dataType:'json'
		,success:function(data){
			if(data==0){
				$("#dataSize3").val(0);
				$("#btn3").val("新增");
			}else{
				$("#dataSize3").val(1);
				$("#evId").val(data.evId);
				$("#csFluxOne").val(data.csFluxOne);
				$("#csFluxTwo").val(data.csFluxTwo);
				$("#btn3").val("编辑");
			}
		}
	})
}
//气密标准
function gas(){
	$("#tab1").addClass("layui-hide");
	$("#tab2").addClass("layui-hide");
	$("#tab3").addClass("layui-hide");
	$("#tab4").removeClass("layui-hide");
	$("#tab5").addClass("layui-hide");
	$("#tab6").addClass("layui-hide");
	$.ajax({
		url:'${pageContext.request.contextPath }/criterion/selectGasCriterion.do'
		,type:'post'
		,dataType:'json'
		,success:function(data){
			if(data==0){
				$("#dataSize4").val(0);
				$("#btn4").val("新增");
			}else{
				$("#dataSize4").val(1);
				$("#gId").val(data.gId);
				$("#oneTime").val(data.oneTime);
				$("#threeTime").val(data.threeTime);
				$("#btn4").val("编辑");
			}
		}
	})
}
//膜丝标准
function silk(){
	$("#tab1").addClass("layui-hide");
	$("#tab2").addClass("layui-hide");
	$("#tab3").addClass("layui-hide");
	$("#tab4").addClass("layui-hide");
	$("#tab5").removeClass("layui-hide");
	$("#tab6").addClass("layui-hide");
	$.ajax({
		url:'${pageContext.request.contextPath }/criterion/selectSilkCriterion.do'
		,type:'post'
		,dataType:'json'
		,success:function(data){
			if(data==0){
				$("#dataSize5").val(0);
				$("#btn5").val("新增");
			}else{
				$("#dataSize5").val(1);
				$("#sId").val(data.sId);
				$("#fluxUp").val(data.fluxUp);
				$("#fluxDown").val(data.fluxDown);
				$("#innerUp").val(data.innerUp);
				$("#innerDown").val(data.innerDown);
				$("#wallUp").val(data.wallUp);
				$("#wallDown").val(data.wallDown);
				$("#pressureUp").val(data.pressureUp);
				$("#pressureDown").val(data.pressureDown);
				$("#strengthUp").val(data.strengthUp);
				$("#strengthDown").val(data.strengthDown);
				$("#btn5").val("编辑");
			}
		}
	})
}
//浇铸抽检标准
function jzSpotCheck(){
	$("#tab1").addClass("layui-hide");
	$("#tab2").addClass("layui-hide");
	$("#tab3").addClass("layui-hide");
	$("#tab4").addClass("layui-hide");
	$("#tab5").addClass("layui-hide");
	$("#tab6").removeClass("layui-hide");
	layui.use(['table','layer','upload','form','laydate'], function(){
		var table = layui.table;
		var layer = layui.layer;
	    var form = layui.form,laydate = layui.laydate;
	    var $ = layui.$;
	    var $ = layui.jquery, active = {
				reload:function () {
					var keyword = $("#keyword").val();
					table.reload('contenttable',{
						method:'get',
						where:{keyword:keyword}
						,page: {
							curr: 1 //重新从第 1 页开始
						}
					});
				}
			}
		$('.layui-btn').on('click', function(){
	        var type = $(this).data('type');
	        active[type] ? active[type].call(this) : '';
	    });
		table.render({
		    elem: '#jzSpotCheckCriterion'
		    ,url:'${pageContext.request.contextPath }/criterion/selectJzSpotCheckCriterionList.do'
		    ,toolbar: '#toolbarDemo'
		    ,title: '浇铸抽检标准'
		    ,id :'contenttable'
		    ,limits:[10,20,30]
		    ,cols: [[
			  {type: 'checkbox', fixed: 'left',width:50}
		      ,{field:'', title:'序号', sort: true, type:'numbers', width: 60}
		      ,{field:'checkItem', title:'检验项'}
		      ,{field:'checkCriterion', title:'标准值'}
		      ,{field:'greatTime', title:'创建日期',templet:function(row){
		    	  return createTime(row.greatTime.time);
		      }}
		      ,{fixed: 'right', title:'操作', toolbar: '#barDemo',width:150}
		    ]]
		    ,page: true
		});
		//头工具栏事件
		table.on('toolbar(jzSpotCheckCriterion)', function(obj){
			var checkStatus = table.checkStatus(obj.config.id);
			var content = '<form class="layui-form layui-card-body" id="addForm6">'+
								'<div class="layui-form-item"><label class="layui-form-label">检测项</label><input class="layui-input" lay-verify="checkItem" id="checkItem" name="checkItem" type="text" value="" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">标准值</label><input class="layui-input" lay-verify="checkCriterion" id="checkCriterion" name="checkCriterion" type="text" value="" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">时间</label><input readonly class="layui-input" lay-verify="greatTime" id="greatTime" name="greatTime" type="text" value="" style="width:300px;"></div>'+
						  		'<div class="layui-form-item"><div class="layui-input-block">'+
									'<button id="subBtn6" class="layui-btn layui-btn-blue" lay-submit lay-filter="submitBtn6">提交</button><button type="reset" id="addReset" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
								'</div></div>'+
							'</form>';
		    switch(obj.event){
		    	case 'add':
		    		layer.open({
						  type: 1 		//Page层类型
						  ,area: ['500px', '300px'] //宽  高
						  ,title: '新增'
						  ,shade: 0.1 	//遮罩透明度
						  ,maxmin: true //允许全屏最小化
						  ,anim: 1 		//0-6的动画形式，-1不开启
						  ,content: content
						  ,success:function(layero, index){
							  form.render();
								//日期
								laydate.render({
								   elem: '#greatTime'
								   ,type: 'date'
								});
						  }
					});
		      	break;
		    }
		})
		//监听行工具事件
		table.on('tool(jzSpotCheckCriterion)', function(obj){
			var data = obj.data;
			if(obj.event === 'del'){
			  layer.confirm('确定删除吗？', function(index){
				var idArr = new Array();
			    var jzId = data.jzId;
			    idArr[0] = jzId;
			    $.ajax({
			    	type:'post',
			    	url:'${pageContext.request.contextPath }/criterion/delJzSpotCheckCriterionArr.do',
			    	data:{"idArr":idArr},
			    	success:function(data){
			    		if(data>0){
			    			toastr.success("删除成功！");
			    			setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
								//关闭模态框
								jzSpotCheck();
							},2000);
			    		}else{
			    			toastr.warning("删除失败！");
			    		}
			    	}
			    		
			    })
			    layer.close(index);
			  });
			}else if(obj.event === 'edit'){
				var content1='<form class="layui-form layui-card-body" id="editForm6">'+
								'<input class="layui-hide" name="jzId" value="'+data.jzId+'">'+
								'<div class="layui-form-item"><label class="layui-form-label">检测项</label><input class="layui-input" lay-verify="checkItem" id="checkItem" name="checkItem" type="text" value="'+data.checkItem+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">标准值</label><input class="layui-input" lay-verify="checkCriterion" id="checkCriterion" name="checkCriterion" type="text" value="'+data.checkCriterion+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">时间</label><input readonly class="layui-input" lay-verify="greatTime" id="greatTime" name="greatTime" type="text" value="'+createTime(data.greatTime.time)+'" style="width:300px;"></div>'+
						  		'<div class="layui-form-item"><div class="layui-input-block">'+
									'<button class="layui-btn layui-btn-blue" lay-submit lay-filter="editBtn6">提交</button><button type="reset" id="addReset" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
								'</div></div>'+
							'</form>';
				layer.open({
					  type: 1 		//Page层类型
					  ,area: ['500px', '300px'] //宽  高
					  ,title: '修改'
					  ,shade: 0.1 	//遮罩透明度
					  ,maxmin: true //允许全屏最小化
					  ,anim: 1 		//0-6的动画形式，-1不开启
					  ,content: content1
					  ,success:function(layero, index){
						  form.render();
					  }
				});
			}
		})
	})
}
layui.use(['table','layer','upload','form','laydate'], function(){
	var table = layui.table;
	var layer = layui.layer;
    var form = layui.form,laydate = layui.laydate;
    var $ = layui.$;
    //演示动画
    $('.site-doc-icon .layui-anim').on('click', function(){
        var othis = $(this), anim = othis.data('anim');
        //停止循环
        if(othis.hasClass('layui-anim-loop')){
            return othis.removeClass(anim);
        }
        othis.removeClass(anim);
        setTimeout(function(){
            othis.addClass(anim);
        });
        //恢复渐隐
        if(anim === 'layui-anim-fadeout'){
            setTimeout(function(){
                othis.removeClass(anim);
            }, 1300);
        }
    });
   	$("#tab1 tbody input").click(function(){
   		$("#btn1").click();
   	});
    $("#btn1").click(function(){
    	var dataSize1 = $("#dataSize1").val();
    	var acId = $("#acId").val();
    	var sizeOneUp = $("#sizeOneUp").val();
    	var sizeOneDown = $("#sizeOneDown").val();
    	var sizeTwoUp = $("#sizeTwoUp").val();
    	var sizeTwoDown = $("#sizeTwoDown").val();
    	var sizeThreeUp = $("#sizeThreeUp").val();
    	var sizeThreeDown = $("#sizeThreeDown").val();
    	if(dataSize1==0){
    		var content = '<form class="layui-form layui-card-body" id="addForm1">'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸1上限值</label><input step="0.01" class="layui-input" lay-verify="sizeOneUp" name="sizeOneUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸1下限值</label><input step="0.01" class="layui-input" lay-verify="sizeOneDown" name="sizeOneDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸2上限值</label><input step="0.01" class="layui-input" lay-verify="sizeTwoUp" name="sizeTwoUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸2下限值</label><input step="0.01" class="layui-input" lay-verify="sizeTwoDown" name="sizeTwoDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸3上限值</label><input step="0.01" class="layui-input" lay-verify="sizeThreeUp" name="sizeThreeUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸3下限值</label><input step="0.01" class="layui-input" lay-verify="sizeThreeDown" name="sizeThreeDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button id="subBtn1" class="layui-btn" type="button" lay-submit lay-filter="submitBtn1">提交</button><button type="reset" id="addReset1" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['500px', '450px']   //宽  高
    			,title: '新增'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}else{
    		var content = '<form class="layui-form layui-card-body" id="editForm1">'+
    							'<input class="layui-hide" name="acId" lay-verify="acId" value="'+acId+'">'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸1上限值</label><input step="0.01" class="layui-input" lay-verify="sizeOneUp" name="sizeOneUp" type="number" value="'+sizeOneUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸1下限值</label><input step="0.01" class="layui-input" lay-verify="sizeOneDown" name="sizeOneDown" type="number" value="'+sizeOneDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸2上限值</label><input step="0.01" class="layui-input" lay-verify="sizeTwoUp" name="sizeTwoUp" type="number" value="'+sizeTwoUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸2下限值</label><input step="0.01" class="layui-input" lay-verify="sizeTwoDown" name="sizeTwoDown" type="number" value="'+sizeTwoDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸3上限值</label><input step="0.01" class="layui-input" lay-verify="sizeThreeUp" name="sizeThreeUp" type="number" value="'+sizeThreeUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">尺寸3下限值</label><input step="0.01" class="layui-input" lay-verify="sizeThreeDown" name="sizeThreeDown" type="number" value="'+sizeThreeDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button class="layui-btn" type="button" lay-submit lay-filter="editBtn1">提交</button><button type="reset" id="editReset1" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['500px', '450px']   //宽  高
    			,title: '修改'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}
    })
   	$("#tab2 tbody input").click(function(){
   		$("#btn2").click();
   	});
    $("#btn2").click(function(){
    	var dataSize2 = $("#dataSize2").val();
    	var lcId = $("#lcId").val();
    	var ryCountOne = $("#ryCountOne").val();
    	var bsCountOne = $("#bsCountOne").val();
    	var wsCountOne = $("#wsCountOne").val();
    	var nleakHuntingCountOne = $("#nleakHuntingCountOne").val();
    	var dmbjOne = $("#dmbjOne").val();
    	var ryCountTwo = $("#ryCountTwo").val();
    	var bsCountTwo = $("#bsCountTwo").val();
    	var wsCountTwo = $("#wsCountTwo").val();
    	var nleakHuntingCountTwo = $("#nleakHuntingCountTwo").val();
    	var dmbjTwo = $("#dmbjTwo").val();
    	if(dataSize2==0){
    		var content = '<form class="layui-form layui-card-body" id="addForm2">'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(软硬A总数，软硬B总数)【合格】</label><input step="1" class="layui-input" lay-verify="ryCountOne" name="ryCountOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(软硬A总数，软硬B总数)【异常】</label><input step="1" class="layui-input" lay-verify="ryCountTwo" name="ryCountTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(瘪丝A，瘪丝B)【合格】</label><input step="1" class="layui-input" lay-verify="bsCountOne" name="bsCountOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(瘪丝A，瘪丝B)【异常】</label><input step="1" class="layui-input" lay-verify="bsCountTwo" name="bsCountTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(弯丝A，弯丝B)【合格】</label><input step="1" class="layui-input" lay-verify="wsCountOne" name="wsCountOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(弯丝A，弯丝B)【异常】</label><input step="1" class="layui-input" lay-verify="wsCountTwo" name="wsCountTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(N次检漏A总数，N次检漏B总数)【合格】</label><input step="1" class="layui-input" lay-verify="nleakHuntingCountOne" name="nleakHuntingCountOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">MAX(N次检漏A总数，N次检漏B总数)【异常】</label><input step="1" class="layui-input" lay-verify="nleakHuntingCountTwo" name="nleakHuntingCountTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">端面补胶【合格】</label><input step="0.01" class="layui-input" lay-verify="dmbjOne" name="dmbjOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">端面补胶【异常】</label><input step="0.01" class="layui-input" lay-verify="dmbjTwo" name="dmbjTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button id="subBtn2" class="layui-btn" type="button" lay-submit lay-filter="submitBtn2">提交</button><button type="reset" id="addReset2" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['750px', '700px']   //宽  高
    			,title: '新增'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}else{
    		var content = '<form class="layui-form layui-card-body" id="editForm2">'+
    							'<input class="layui-hide" name="lcId" lay-verify="lcId" value="'+lcId+'">'+
					    		'<div class="layui-form-item"><label class="layui-form-label">MAX(软硬A总数，软硬B总数)【合格】</label><input step="1" class="layui-input" lay-verify="ryCountOne" name="ryCountOne" type="number" value="'+ryCountOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(软硬A总数，软硬B总数)【异常】</label><input step="1" class="layui-input" lay-verify="ryCountTwo" name="ryCountTwo" type="number" value="'+ryCountTwo+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(瘪丝A，瘪丝B)【合格】</label><input step="1" class="layui-input" lay-verify="bsCountOne" name="bsCountOne" type="number" value="'+bsCountOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(瘪丝A，瘪丝B)【异常】</label><input step="1" class="layui-input" lay-verify="bsCountTwo" name="bsCountTwo" type="number" value="'+bsCountTwo+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(弯丝A，弯丝B)【合格】</label><input step="1" class="layui-input" lay-verify="wsCountOne" name="wsCountOne" type="number" value="'+wsCountOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(弯丝A，弯丝B)【异常】</label><input step="1" class="layui-input" lay-verify="wsCountTwo" name="wsCountTwo" type="number" value="'+wsCountTwo+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(N次检漏A总数，N次检漏B总数)【合格】</label><input step="1" class="layui-input" lay-verify="nleakHuntingCountOne" name="nleakHuntingCountOne" type="number" value="'+nleakHuntingCountOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">MAX(N次检漏A总数，N次检漏B总数)【异常】</label><input step="1" class="layui-input" lay-verify="nleakHuntingCountTwo" name="nleakHuntingCountTwo" type="number" value="'+nleakHuntingCountTwo+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">端面补胶【合格】</label><input step="0.01" class="layui-input" lay-verify="dmbjOne" name="dmbjOne" type="number" value="'+dmbjOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">端面补胶【异常】</label><input step="0.01" class="layui-input" lay-verify="dmbjTwo" name="dmbjTwo" type="number" value="'+dmbjTwo+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button class="layui-btn" type="button" lay-submit lay-filter="editBtn2">提交</button><button type="reset" id="editReset2" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['750px', '700px']   //宽  高
    			,title: '修改'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}
    })
   	$("#tab3 tbody input").click(function(){
   		$("#btn3").click();
   	});
    $("#btn3").click(function(){
    	var dataSize3 = $("#dataSize3").val();
    	var evId = $("#evId").val();
    	var csFluxOne = $("#csFluxOne").val();
    	var csFluxTwo = $("#csFluxTwo").val();
    	if(dataSize3==0){
    		var content = '<form class="layui-form layui-card-body" id="addForm3">'+
    							'<div class="layui-form-item"><label class="layui-form-label">产水通量【合格】</label><input step="0.01" class="layui-input" lay-verify="csFluxOne" name="csFluxOne" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">产水通量【异常】</label><input step="0.01" class="layui-input" lay-verify="csFluxTwo" name="csFluxTwo" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button id="subBtn3" class="layui-btn" type="button" lay-submit lay-filter="submitBtn3">提交</button><button type="reset" id="addReset3" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '250px']   //宽  高
    			,title: '新增'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}else{
    		var content = '<form class="layui-form layui-card-body" id="editForm3">'+
    							'<input class="layui-hide" name="evId" lay-verify="evId" value="'+evId+'">'+
								'<div class="layui-form-item"><label class="layui-form-label">产水通量【合格】</label><input step="0.01" class="layui-input" lay-verify="csFluxOne" name="csFluxOne" type="number" value="'+csFluxOne+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">产水通量【异常】</label><input step="0.01" class="layui-input" lay-verify="csFluxTwo" name="csFluxTwo" type="number" value="'+csFluxTwo+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button class="layui-btn" type="button" lay-submit lay-filter="editBtn3">提交</button><button type="reset" id="editReset3" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '250px']   //宽  高
    			,title: '修改'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}
    })
   	$("#tab4 tbody input").click(function(){
   		$("#btn4").click();
   	});
    $("#btn4").click(function(){
    	var dataSize4 = $("#dataSize4").val();
    	var gId = $("#gId").val();
    	var oneTime = $("#oneTime").val();
    	var threeTime = $("#threeTime").val();
    	if(dataSize4==0){
    		var content = '<form class="layui-form layui-card-body" id="addForm4">'+
    							'<div class="layui-form-item"><label class="layui-form-label">1次间隔时间（s）</label><input step="1" class="layui-input" lay-verify="oneTime" name="oneTime" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">3次间隔时间（s）</label><input step="1" class="layui-input" lay-verify="threeTime" name="threeTime" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button id="subBtn4" class="layui-btn" type="button" lay-submit lay-filter="submitBtn4">提交</button><button type="reset" id="addReset4" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '250px']   //宽  高
    			,title: '新增'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}else{
    		var content = '<form class="layui-form layui-card-body" id="editForm4">'+
    							'<input class="layui-hide" name="gId" lay-verify="gId" value="'+gId+'">'+
								'<div class="layui-form-item"><label class="layui-form-label">1次间隔时间（s）</label><input step="1" class="layui-input" lay-verify="oneTime" name="oneTime" type="number" value="'+oneTime+'" style="width:300px;"></div>'+
								'<div class="layui-form-item"><label class="layui-form-label">3次间隔时间（s）</label><input step="1" class="layui-input" lay-verify="threeTime" name="threeTime" type="number" value="'+threeTime+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button class="layui-btn" type="button" lay-submit lay-filter="editBtn4">提交</button><button type="reset" id="editReset4" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '250px']   //宽  高
    			,title: '修改'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}
    })
   	$("#tab5 tbody input").click(function(){
   		$("#btn5").click();
   	});
    $("#btn5").click(function(){
    	var dataSize5 = $("#dataSize5").val();
    	var sId = $("#sId").val();
    	var fluxUp = $("#fluxUp").val();
    	var fluxDown = $("#fluxDown").val();
    	var innerUp = $("#innerUp").val();
    	var innerDown = $("#innerDown").val();
    	var wallUp = $("#wallUp").val();
    	var wallDown = $("#wallDown").val();
    	var pressureUp = $("#pressureUp").val();
    	var pressureDown = $("#pressureDown").val();
    	var strengthUp = $("#strengthUp").val();
    	var strengthDown = $("#strengthDown").val();
    	if(dataSize5==0){
    		var content = '<form class="layui-form layui-card-body" id="addForm5">'+
    							'<div class="layui-form-item"><label class="layui-form-label">通量（上限值）</label><input step="0.01" class="layui-input" lay-verify="fluxUp" name="fluxUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">通量（下限值）</label><input step="0.01" class="layui-input" lay-verify="fluxDown" name="fluxDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">内径（上限值）</label><input step="0.01" class="layui-input" lay-verify="innerUp" name="innerUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">内径（下限值）</label><input step="0.01" class="layui-input" lay-verify="innerDown" name="innerDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">壁厚（上限值）</label><input step="0.01" class="layui-input" lay-verify="wallUp" name="wallUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">壁厚（下限值）</label><input step="0.01" class="layui-input" lay-verify="wallDown" name="wallDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">泡点压力（上限值）</label><input step="0.01" class="layui-input" lay-verify="pressureUp" name="pressureUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">泡点压力（下限值）</label><input step="0.01" class="layui-input" lay-verify="pressureDown" name="pressureDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">强度（上限值）</label><input step="0.01" class="layui-input" lay-verify="strengthUp" name="strengthUp" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">强度（下限值）</label><input step="0.01" class="layui-input" lay-verify="strengthDown" name="strengthDown" type="number" value="" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button id="subBtn5" class="layui-btn" type="button" lay-submit lay-filter="submitBtn5">提交</button><button type="reset" id="addReset5" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '700px']   //宽  高
    			,title: '新增'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}else{
    		var content = '<form class="layui-form layui-card-body" id="editForm5">'+
    							'<input class="layui-hide" name="sId" lay-verify="sId" value="'+sId+'">'+
    							'<div class="layui-form-item"><label class="layui-form-label">通量（上限值）</label><input step="0.01" class="layui-input" lay-verify="fluxUp" name="fluxUp" type="number" value="'+fluxUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">通量（下限值）</label><input step="0.01" class="layui-input" lay-verify="fluxDown" name="fluxDown" type="number" value="'+fluxDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">内径（上限值）</label><input step="0.01" class="layui-input" lay-verify="innerUp" name="innerUp" type="number" value="'+innerUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">内径（下限值）</label><input step="0.01" class="layui-input" lay-verify="innerDown" name="innerDown" type="number" value="'+innerDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">壁厚（上限值）</label><input step="0.01" class="layui-input" lay-verify="wallUp" name="wallUp" type="number" value="'+wallUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">壁厚（下限值）</label><input step="0.01" class="layui-input" lay-verify="wallDown" name="wallDown" type="number" value="'+wallDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">泡点压力（上限值）</label><input step="0.01" class="layui-input" lay-verify="pressureUp" name="pressureUp" type="number" value="'+pressureUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">泡点压力（下限值）</label><input step="0.01" class="layui-input" lay-verify="pressureDown" name="pressureDown" type="number" value="'+pressureDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">强度（上限值）</label><input step="0.01" class="layui-input" lay-verify="strengthUp" name="strengthUp" type="number" value="'+strengthUp+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><label class="layui-form-label">强度（下限值）</label><input step="0.01" class="layui-input" lay-verify="strengthDown" name="strengthDown" type="number" value="'+strengthDown+'" style="width:300px;"></div>'+
    							'<div class="layui-form-item"><div class="layui-input-block">'+
    								'<button class="layui-btn" type="button" lay-submit lay-filter="editBtn5">提交</button><button type="reset" id="editReset5" class="layui-btn layui-btn-primary" style="margin-left:140px">重置</button>'+
    							'</div></div>'+
    					'</form>';
    		layer.open({
    			type: 1 					//Page层类型
    			,area: ['550px', '700px']   //宽  高
    			,title: '修改'
    			,shade: 0.6 				//遮罩透明度
    			,maxmin: true			    //允许全屏最小化
    			,anim: 1 					//0-6的动画形式，-1不开启
    			,content: content
    			,success:function(layero, index){
    				form.render();
    			}
    		});
    	}
    })
    /**
     * 表单校验
     */
    form.verify({
    	//value：表单的值、item：表单的DOM对象
    	sizeOneUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,sizeOneDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,sizeTwoUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,sizeTwoDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,sizeThreeUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,sizeThreeDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,ryCount: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,bsCount: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,wsCount: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,nleakHuntingCount: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,dmbj: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,csFluxOne: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,csFluxTwo: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,oneTime: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,threeTime: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,fluxUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,fluxDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,innerUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,innerDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,wallUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,wallDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,pressureUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,pressureDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,strengthUp: function(value, item){
    		if(value == ''){
    			return '上限值不能为空';
    		}
    	}
    	,strengthDown: function(value, item){
    		if(value == ''){
    			return '下限值不能为空';
    		}
    	}
    	,aspect: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,cap: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,cut: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,endAspect: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,endHardness: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,checkItem: function(value, item){
    		if(value == ''){
    			return '检验项不能为空';
    		}
    	}
    	,checkCriterion: function(value, item){
    		if(value == ''){
    			return '标准值不能为空';
    		}
    	}
    	,greatTime: function(value, item){
    		if(value == ''){
    			return '创建日期不能为空';
    		}
    	}
    });
    /**
     * 通用表单提交(AJAX方式)（新增1）
     */
    form.on('submit(submitBtn1)', function (data) {
    	$("#subBtn1").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertAccessoriesCriterion.do',
			data : $("#addForm1").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						accessories();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改1）
     */
    form.on('submit(editBtn1)', function (data) {
    	layer.confirm('确定修改吗？', function(index){
	    	$.ajax({
				type : "post",
				url : '${pageContext.request.contextPath}/criterion/editAccessoriesCriterion.do',
				data : $("#editForm1").serialize(),
				cache : false,
				async:false
				}).done(
					function(res) {
						if (res == 1) {
							toastr.success('修改成功！');
						}
						setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
							//关闭模态框
							layer.closeAll();
							accessories();  
						},2000);
					}
				).fail(
					function(res) {
						toastr.error('修改失败！');
					}
				)
				return false;
    	});
    });
    /**
     * 通用表单提交(AJAX方式)（新增2）
     */
    form.on('submit(submitBtn2)', function (data) {
    	$("#subBtn2").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertLeakHuntingCriterion.do',
			data : $("#addForm2").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						leakHunting();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改2）
     */
    form.on('submit(editBtn2)', function (data) {
    	layer.confirm('确定修改吗？', function(index){
	    	$.ajax({
				type : "post",
				url : '${pageContext.request.contextPath}/criterion/editLeakHuntingCriterion.do',
				data : $("#editForm2").serialize(),
				cache : false,
				async:false
				}).done(
					function(res) {
						if (res == 1) {
							toastr.success('修改成功！');
						}
						setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
							//关闭模态框
							layer.closeAll();
							leakHunting();  
						},2000);
					}
				).fail(
					function(res) {
						toastr.error('修改失败！');
					}
				)
				return false;
    	});
    });
    /**
     * 通用表单提交(AJAX方式)（新增3）
     */
    form.on('submit(submitBtn3)', function (data) {
    	$("#subBtn3").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertEvaluateCriterion.do',
			data : $("#addForm3").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						evaluateCriterion();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改3）
     */
    form.on('submit(editBtn3)', function (data) {
    	layer.confirm('确定修改吗？', function(index){
	    	$.ajax({
				type : "post",
				url : '${pageContext.request.contextPath}/criterion/editEvaluateCriterion.do',
				data : $("#editForm3").serialize(),
				cache : false,
				async:false
				}).done(
					function(res) {
						if (res == 1) {
							toastr.success('修改成功！');
						}
						setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
							//关闭模态框
							layer.closeAll();
							evaluateCriterion();  
						},2000);
					}
				).fail(
					function(res) {
						toastr.error('修改失败！');
					}
				)
				return false;
    	});
    });
    /**
     * 通用表单提交(AJAX方式)（新增4）
     */
    form.on('submit(submitBtn4)', function (data) {
    	$("#subBtn4").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertGasCriterion.do',
			data : $("#addForm4").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						gas();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改4）
     */
    form.on('submit(editBtn4)', function (data) {
    	layer.confirm('确定修改吗？', function(index){
	    	$.ajax({
				type : "post",
				url : '${pageContext.request.contextPath}/criterion/editGasCriterion.do',
				data : $("#editForm4").serialize(),
				cache : false,
				async:false
				}).done(
					function(res) {
						if (res == 1) {
							toastr.success('修改成功！');
						}
						setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
							//关闭模态框
							layer.closeAll();
							gas();
						},2000);
					}
				).fail(
					function(res) {
						toastr.error('修改失败！');
					}
				)
				return false;
    	});
    });
    /**
     * 通用表单提交(AJAX方式)（新增5）
     */
    form.on('submit(submitBtn5)', function (data) {
    	$("#subBtn5").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertSilkCriterion.do',
			data : $("#addForm5").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						silk();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改5）
     */
    form.on('submit(editBtn5)', function (data) {
    	layer.confirm('确定修改吗？', function(index){
	    	$.ajax({
				type : "post",
				url : '${pageContext.request.contextPath}/criterion/editSilkCriterion.do',
				data : $("#editForm5").serialize(),
				cache : false,
				async:false
				}).done(
					function(res) {
						if (res == 1) {
							toastr.success('修改成功！');
						}
						setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
							//关闭模态框
							layer.closeAll();
							silk();
						},2000);
					}
				).fail(
					function(res) {
						toastr.error('修改失败！');
					}
				)
				return false;
    	});
    });
    /**
     * 通用表单提交(AJAX方式)（新增6）
     */
    form.on('submit(submitBtn6)', function (data) {
    	$("#subBtn6").attr("disabled",true);
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/insertJzSpotCheckCriterion.do',
			data : $("#addForm6").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('新增成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						jzSpotCheck();  
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('新增失败！');
				}
			)
			return false;
    });
    /**
     * 通用表单提交(AJAX方式)（修改6）
     */
    form.on('submit(editBtn6)', function (data) {
    	$.ajax({
			type : "post",
			url : '${pageContext.request.contextPath}/criterion/editJzSpotCheckCriterion.do',
			data : $("#editForm6").serialize(),
			cache : false,
			async:false
			}).done(
				function(res) {
					if (res == 1) {
						toastr.success('修改成功！');
					}
					setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
						//关闭模态框
						layer.closeAll();
						jzSpotCheck();
					},2000);
				}
			).fail(
				function(res) {
					toastr.error('修改失败！');
				}
			)
			return false;
   	});
});
toastr.options.positionClass = 'toast-top-center'; //提示框的位置设置为中上
</script>
</body>
</html>